Rates of HIV-associated neurocognitive (NC) disorders remain high, despite the emergence of HAART. HIV-infected drug users exhibit accelerated and more severe NC dysfunction than either HIV-infected persons without drug use histories, or uninfected drug users. Because the risk of NC impairment is also elevated in opioid users regardless of HIV-status, there is additive risk of NC impairment for HIV-infected opioid users. How medications commonly used to treat opioid dependence affect the progression NC dysfunction is poorly understood. Methadone is the most commonly used medication for opioid addiction treatment, and some studies suggest that methadone, a full mu opioid receptor agonist, may be associated with NC deficits. However, these studies have largely lacked longitudinal follow-up to assess whether long-term methadone maintenance is associated with progression of NC dysfunction. Further, despite its therapeutic benefits, methadone is under- utilized, with only 12% of opioid-dependent Americans receiving methadone in 2005. To remedy this, buprenrophine was approved for opioid addiction treatment in 2002. Buprenorphine, a partial mu opioid receptor agonist and kappa opioid receptor antagonist, may have favorable NC effects compared to methadone. However, few studies have examined buprenorphine's NC effects, and none have included longitudinal follow-up or focused on HIV-infected persons. To ensure that treatment providers understand the full range of buprenorphine's effects, it is crucial to evaluate the relative NC effects of buprenorphine and methadone in opioid users with and without HIV infection. In this revised application, we propose to use a randomized clinical trial (RCT) design to test the hypothesis that treatment with buprenorphine is associated with significant improvement in NC function in opioid-dependent drug users with- and with- out HIV, compared to methadone. We will also examine whether HIV-infection moderates the impact of opioid agonist therapies on NC function. We will enroll and randomize 160 subjects 1:1 to 6 months of buprenorphine or methadone treatment, both of which will be delivered in the same supervised setting by experienced substance abuse treatment physicians. We will stratify randomization by HIV-serostatus, to ensure equal numbers of HIV-infected subjects in each arm. Following randomization and a one week run-in, we will measure NC function with a state-of-the art NC battery. We will then repeat the NC battery after 3 and 6 months of opioid agonist treatment. Our specific aims are: (1) to determine, in an RCT, whether buprenorphine is associated with significant improvement in NC function compared to methadone; (2) to assess the impact of buprenorphine treatment on change in NC function over time; and (3) to assess the impact of methadone treatment on changes in NC function over time. This will be the first randomized longitudinal trial investigating the impact of methadone and buprenorphine on neurocognitive outcomes. Findings from this study have the potential to impact treatment recommendations for opioid dependence for drug users with or without HIV, to improve NC outcomes, and to deepen our understanding of brain-drug interactions.